package com.lfy.service;


import org.apache.poi.ss.formula.functions.T;
import org.springframework.cglib.core.internal.Function;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Service
public class Fun {

    public <T>T ts(sendEmail<T> function){
        System.out.println("之前");
        function.sendEmail();
        System.out.println("之后");
        return function.sendEmail();
    }


    @FunctionalInterface
    public interface sendEmail<T>{
        T sendEmail();
    }

}
